/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('ims_crl_tpshop_transfers', {
    id: {
      type: DataTypes.INTEGER(11).UNSIGNED,
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    type: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '1'
    },
    mch_appid: {
      type: DataTypes.STRING(128),
      allowNull: false
    },
    mchid: {
      type: DataTypes.STRING(32),
      allowNull: false
    },
    partner_trade_no: {
      type: DataTypes.STRING(32),
      allowNull: false,
      defaultValue: ''
    },
    openid: {
      type: DataTypes.CHAR(32),
      allowNull: false,
      defaultValue: ''
    },
    amount: {
      type: DataTypes.DECIMAL,
      allowNull: false,
      defaultValue: '0.00'
    },
    desc: {
      type: DataTypes.STRING(50),
      allowNull: false,
      defaultValue: ''
    },
    result_code: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '0'
    },
    err_code: {
      type: DataTypes.STRING(32),
      allowNull: false,
      defaultValue: ''
    },
    err_code_des: {
      type: DataTypes.STRING(128),
      allowNull: false,
      defaultValue: ''
    },
    payment_no: {
      type: DataTypes.STRING(64),
      allowNull: false,
      defaultValue: ''
    },
    payment_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    user_id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    retry_count: {
      type: DataTypes.INTEGER(4),
      allowNull: false,
      defaultValue: '0'
    },
    retry_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    create_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    update_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    delete_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    }
  }, {
    tableName: 'ims_crl_tpshop_transfers'
  });

  Model.associate = function() {

  }

  return Model;
};
